import { createRouter, createWebHistory } from 'vue-router'
import home from '../category/home/index.vue'
// 智能监控
import monitor from '../category/monitor/index.vue'
import overview from '../category/monitor/components/overview.vue';
import dataCenter from '../category/monitor/components/dataCenter.vue';
import compSupervision from '../category/monitor/components/compSupervision.vue';
import equipSupervision from '../category/monitor/components/equipSupervision.vue';
import cabinetManage from '../category/monitor/components/cabinetManage.vue';
import busiSupervision from '../category/monitor/components/busiSupervision.vue';
import networkSupervision from '../category/monitor/components/networkSupervision.vue';
import dedicaManage from '../category/monitor/components/dedicaManage.vue';
import intelliUbit from '../category/monitor/components/intelliUbit.vue';
import intelliInspect from '../category/monitor/components/intelliInspect.vue';
import offlinePlan from '../category/monitor/components/offlinePlan.vue';
import powerPlan from '../category/monitor/components/powerPlan.vue';
import statusSearch from '../category/monitor/components/statusSearch.vue';
// 资产管理
import property from '../category/property/index.vue'
import assetOverview from '../category/property/components/assetOverview.vue';
import assetEquip from '../category/property/components/assetEquip.vue';
import equipCircul from '../category/property/components/equipCircul.vue';
import changeReview from '../category/property/components/changeReview.vue';
import equipMaintenan from '../category/property/components/equipMaintenan.vue';
import assetInventory from '../category/property/components/assetInventory.vue';
import ipResource from '../category/property/components/ipResource.vue';
import spareParts from '../category/property/components/spareParts.vue';
import equipSpecifi from '../category/property/components/equipSpecifi.vue';
// 告警中心
import alarm from '../category/alarm/index.vue'
import alarmOverview from '../category/alarm/components/alarmOverview.vue';
import activeAlarm from '../category/alarm/components/activeAlarm.vue';
import historyAlarm from '../category/alarm/components/historyAlarm.vue';
import alarmSettings from '../category/alarm/components/alarmSettings.vue';
// 数据报表
import report from '../category/report/index.vue'
import reportTemp from '../category/report/components/reportTemp.vue';
import reportAnalysis from '../category/report/components/reportAnalysis.vue';
// 智能发现
import intelligent from '../category/intelligent/index.vue'
import autoDiscove from '../category/intelligent/components/autoDiscove.vue';
import planDiscove from '../category/intelligent/components/planDiscove.vue';
import deviceDiscove from '../category/intelligent/components/deviceDiscove.vue';
import OIDConfig from '../category/intelligent/components/OIDConfig.vue';

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: home
    },
    {
      path: '/monitor',
      name: 'monitor',
      component: monitor,
      children: [
        { path: '', redirect: '/monitor/overview' },
        { path: 'overview', name: 'overview', component: overview },
        { path: 'dataCenter', name: 'dataCenter', component: dataCenter },
        { path: 'compSupervision', name: 'compSupervision', component: compSupervision },
        { path: 'equipSupervision', name: 'equipSupervision', component: equipSupervision },
        { path: 'cabinetManage', name: 'cabinetManage', component: cabinetManage },
        { path: 'busiSupervision', name: 'busiSupervision', component: busiSupervision },
        { path: 'networkSupervision', name: 'networkSupervision', component: networkSupervision },
        { path: 'dedicaManage', name: 'dedicaManage', component: dedicaManage },
        { path: 'intelliUbit', name: 'intelliUbit', component: intelliUbit },
        { path: 'intelliInspect', name: 'intelliInspect', component: intelliInspect },
        { path: 'offlinePlan', name: 'offlinePlan', component: offlinePlan },
        { path: 'powerPlan', name: 'powerPlan', component: powerPlan },
        { path: 'statusSearch', name: 'statusSearch', component: statusSearch },
      ]
    },
    {
      path: '/property',
      name: 'property',
      component: property,
      children: [
        { path: '', redirect: '/property/assetOverview' },
        { path: 'assetOverview', name: 'assetOverview', component: assetOverview },
        { path: 'assetEquip', name: 'assetEquip', component: assetEquip },
        { path: 'equipCircul', name: 'equipCircul', component: equipCircul },
        { path: 'changeReview', name: 'changeReview', component: changeReview },

        { path: 'equipMaintenan', name: 'equipMaintenan', component: equipMaintenan },
        { path: 'assetInventory', name: 'assetInventory', component: assetInventory },
        { path: 'ipResource', name: 'ipResource', component: ipResource },
        { path: 'spareParts', name: 'spareParts', component: spareParts },
        { path: 'equipSpecifi', name: 'equipSpecifi', component: equipSpecifi },
      ]
    },
    {
      path: '/alarm',
      name: 'alarm',
      component: alarm,
      children: [
        { path: '', redirect: '/alarm/alarmOverview' },
        { path: 'alarmOverview', name: 'alarmOverview', component: alarmOverview },
        { path: 'activeAlarm', name: 'activeAlarm', component: activeAlarm },
        { path: 'historyAlarm', name: 'historyAlarm', component: historyAlarm },
        { path: 'alarmSettings', name: 'alarmSettings', component: alarmSettings },
      ]
    },
    {
      path: '/report',
      name: 'report',
      component: report,
      children: [
        { path: '', redirect: '/report/reportAnalysis' },
        { path: 'reportAnalysis', name: 'reportAnalysis', component: reportAnalysis },
        { path: 'reportTemp', name: 'reportTemp', component: reportTemp },
      ]
    },
    {
      path: '/intelligent',
      name: 'intelligent',
      component: intelligent,
      children: [
        { path: '', redirect: '/intelligent/autoDiscove' },
        { path: 'autoDiscove', name: 'autoDiscove', component: autoDiscove },
        { path: 'planDiscove', name: 'planDiscove', component: planDiscove },
        { path: 'deviceDiscove', name: 'deviceDiscove', component: deviceDiscove },
        { path: 'OIDConfig', name: 'OIDConfig', component: OIDConfig },
      ]
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue')
    }
  ]
})

export default router
